#ifndef SLAVE_TIMER_PROTOCOL_H_
#define SLAVE_TIMER_PROTOCOL_H_

/*
 * Basically , the timer supports 2 operations heres.
 * One is adding a timer bind to a certain source ;the other is 
 * removing a existed timer .
 * For add a timer, the void* data area should be assigned with a
 * struct slave_timer_req structure to indicates how to
 * add a time. If the operation is specified with remove , the data
 * area can just leave as empty, since this operation does not require
 * any additional data protocol.
 * If the data is specified with edit, the data area must be pointed to
 * a struct slave_timer_req which stores the parameter .
 * If the data is specified with resolution change, the data area must be
 * a size_t type which stores the value of the resolution. This operation
 * will change all the timer related operation.
 */
struct slave_timer_protocol {
	const char* op;
	void* data;
};

struct slave_timer_req {
	size_t ticks;
	int ttf;
};

/*
 * This two string is used to assign to slave_timer_protocol op area
 */
static const char* slave_timer_add_timer_op = "ADD";
static const char* slave_timer_remove_timer_op="REMOVE";
static const char* slave_timer_edit_timer_op = "EDIT";
static const char* slave_timer_resolution_op = "RESOLUTION";

#endif